package com.qf.data.course.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.qf.commons.base.entity.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 课程信息表(Course)表实体类
 *
 * @author makejava
 * @since 2022-11-29 16:34:51
 */
@Data
@Accessors(chain = true)
public class Course extends BaseEntity implements Serializable {
    //主键
    @TableId(type = IdType.AUTO)
    private Long id;
    //课程名称
    private String cname;
    //教师id (teacher表的id字段外键)
    private Long tid;
    //分类id - 外键
    private Long tpid;
    //封面
    private String fengmian;
    //课程价格
    private Double price;
    //课程详细介绍
    private String info;
    //开课时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    //结课时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
}

